#pragma once
#include "instrument.h"
#include "AmpADSR.h"
#include "DrumSynth.h"

class CDrumInstrument :
	public CInstrument
{
public:
	CDrumInstrument(void);
	~CDrumInstrument(void);

	virtual void Start( void );
	virtual bool Generate( void );
	virtual void SetNote( CNote *aNote );

	void SetDuration( double aDuration ) { mDuration = aDuration; mAmpADSR.SetDuration(aDuration); mDrumNoise.SetDuration(aDuration);}
	void SetFreq( double aFreq ) {mDrumNoise.SetPitch( aFreq ); mFreq = aFreq;}

private:
	CDrumSynth mDrumNoise;
	CAmpADSR mAmpADSR;
	double mTime;
	double mDuration;

	double mFreq;
};

